FROM centos
RUN set -x; rm -if ~/.bashrc \\
    && mkdir -p ~/workspace/golang
COPY .bashrc /root/
ENV GOPATH /root/workspace/golang
RUN set -x; cd $GOPATH \\
    && yum -y install make autoconf automake cmake perl-CPAN libcurl-devel libtool gcc gcc-c++ glibc-headers zlib-devel git-lfs telnet ctags lrzsz jq expat-devel openssl-devel wget tcl-devel gettext python3 python2 lua   \\
    && source ~/.bashrc \\
    && cd /tmp \\
    && wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.30.2.tar.gz \\
    && tar -xvzf git-2.30.2.tar.gz \\
    && cd git-2.30.2/ \\
    && ./configure \\
    && make \\
    && make install \\
    && git --version \\
    && git config --global user.name "Fcou" \\
    && git config --global user.email "lyz672673107@gmail.com" \\
    && git config --global credential.helper store \\
    && git config --global core.longpaths true \\
    && git config --global core.quotepath off \\
    && git config --global url."https://github.com.cnpmjs.org/".insteadOf "https://github.com/" \\
    && git lfs install --skip-repo \\ 
    && wget https://golang.google.cn/dl/go1.17.2.linux-amd64.tar.gz -O /tmp/go1.17.2.linux-amd64.tar.gz \\
    && mkdir -p $HOME/go \\
    && tar -xvzf /tmp/go1.17.2.linux-amd64.tar.gz -C $HOME/go \\
    && mv $HOME/go/go $HOME/go/go1.17.2 \\
    && cd /tmp/ \\
    && git clone --depth=1 https://github.com/protocolbuffers/protobuf \\
    && cd protobuf \\
    && ./autogen.sh \\
    && ./configure \\
    && make \\
    && make install \\
    && /root/go/go1.17.2/bin/go get -u github.com/golang/protobuf/protoc-gen-go \\
    && yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \\
    && yum install -y neovim python3-neovim \\
    && cd /tmp \\
    && wget https://marmotedu-1254073058.cos.ap-beijing.myqcloud.com/tools/marmotVim.tar.gz \\
    && tar -xvzf marmotVim.tar.gz \\
    && cd marmotVim \\
    && ./marmotVimCtl install \\
    && cd /tmp \\
    && wget https://marmotedu-1254073058.cos.ap-beijing.myqcloud.com/tools/gotools-for-spacevim.tgz \\
    && mkdir -p $GOPATH/bin \\
    && tar -xvzf gotools-for-spacevim.tgz -C $GOPATH/bin \\
    && rm -rf /tmp/*
    
